package com.sykj.qianxuezhan.server.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sykj.qianxuezhan.bean.ShopPost;
import com.sykj.qianxuezhan.mapper.ShopPostMapper;
import com.sykj.qianxuezhan.server.ShopPostService;
import com.sykj.util.reponse.CommonEnum;
import com.sykj.util.reponse.ResultBody;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * @Author QianXuezhan
 * @Date 2020/7/28 19:51
 * @Description: TODO
 */
@Service
public class ShopPostServiceImpl extends  ServiceImpl<ShopPostMapper,ShopPost> implements  ShopPostService{
    @Autowired
    private  ShopPostMapper shopPostMapper;

    @Override
    public List<ShopPost> queryShopPost1() {
        return shopPostMapper.selectList(null);
    }

    /**
     * @Date:
     * @Description: 查询所有职位信息
     **/
    @Override
    public List<ShopPost> queryShopPost(ShopPost shopPost) {
        return shopPostMapper.queryShopPost(shopPost);
    }

    /**
     * @Date:
     * @Description: 根据id删除职位信息
     **/
    @Override
    public ResultBody updatePostDelId(String postId) {
        shopPostMapper.updatePostDelId(postId);
        return  new ResultBody(CommonEnum.SUCCESS);
    }

    @Override
    public ResultBody updatePost(ShopPost shopPost) {

        shopPostMapper.updatePost(shopPost);
        return  new ResultBody(CommonEnum.SUCCESS);
    }

    @Override
    public ResultBody addPost(ShopPost shopPost) {
        shopPostMapper.addPost(shopPost);
        return  new ResultBody(CommonEnum.SUCCESS);
    }



}
